<?php

namespace app\model;

use think\Model;
use think\response\Json;

class PublishingHouseModel extends Model
{
    protected $table = "出版社";
    protected $pk = "publishingHouseId";

    public function insertPublishingHouses($publishingHouses): int
    {
        return $this->insertAll($publishingHouses);
    }

    public function deletePublishingHouses($ids)
    {
        return self::destroy($ids);
    }

    public function getAllPublishingHouses()
    {
        return self::select();
    }

    public function updatePublishingHouses($publishingHouses)
    {
        //更新每一个读者
        foreach ($publishingHouses as $key => $value)
            self::update($value);// == "";
    }

}